package game.controller.unit
{
	import game.constants.ApplicationNotification;
	import game.constants.gameEvent.notif.GameEventNotification;
	import game.constants.items.notif.ItemNotification;
	import game.model.gameEvent.GameEventProxy;
	import game.model.gameEvent.vo.GameEventVO;
	import game.model.items.ItemProxy;
	import game.model.items.vo.ItemVO;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	/**
	 * ...
	 * @author Thot
	 */
	
	public class GameEventTestCommand extends SimpleCommand
	{
		override public function execute( notification:INotification ):void
		{
			var eventProxy:GameEventProxy = facade.retrieveProxy(GameEventProxy.NAME) as GameEventProxy;
			var itemProxy:ItemProxy = facade.retrieveProxy(ItemProxy.NAME) as ItemProxy;
			var itemVO:ItemVO = new ItemVO(2, "ring", 1000);
			var notif:GameEventNotification = new GameEventNotification("buyItemTrigger");
			var vo1:GameEventVO = new GameEventVO();
			
			vo1.actionBody = new ItemNotification("ring", 1, 1500);
			vo1.actionName = ApplicationNotification.BUY_ITEM;
			vo1.iteration = 1;
			vo1.name = "buyItemEvent";
			vo1.trigger = "buyItemTrigger";
			
			itemProxy.addItem(itemVO);
			eventProxy.addGameEvent(vo1);
			
			sendNotification(ApplicationNotification.LAUNCH_TRIGGER, notif );
		}
	}
}